package com.cmit.np.xhzw.sync.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cmit.np.xhzw.sync.model.NpOutMsisdn;
import com.cmit.np.xhzw.sync.mapper.NpOutMsisdnMapper;
import com.cmit.np.xhzw.sync.service.NpOutMsisdnService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.apache.commons.lang3.StringUtils;

import java.util.List;
/**
 * <p>
 * ????? 服务实现类
 * </p>
 *
 * @author zhoushuang
 * @since 2021-09-17
 */
@Service
@Transactional
public class NpOutMsisdnServiceImpl extends ServiceImpl<NpOutMsisdnMapper, NpOutMsisdn> implements NpOutMsisdnService {

    @Autowired
    private NpOutMsisdnMapper npOutMsisdnMapper;

    @Override
    public IPage<NpOutMsisdn> selectPage(Page<NpOutMsisdn> page, NpOutMsisdn npOutMsisdn) {
        QueryWrapper<NpOutMsisdn> queryWrapper = new QueryWrapper<NpOutMsisdn>();
        getQueryWrapper(queryWrapper,npOutMsisdn);
        return npOutMsisdnMapper.selectPage(page,queryWrapper);
    }

    @Override
    public List<NpOutMsisdn> selectList(NpOutMsisdn npOutMsisdn) {
        QueryWrapper<NpOutMsisdn> queryWrapper = new QueryWrapper<NpOutMsisdn>();
        getQueryWrapper(queryWrapper,npOutMsisdn);
        return npOutMsisdnMapper.selectList(queryWrapper);
    }

    /**
     *  公共查询条件
     * @param queryWrapper
     * @return
     */
    public QueryWrapper<NpOutMsisdn> getQueryWrapper(QueryWrapper<NpOutMsisdn> queryWrapper,NpOutMsisdn npOutMsisdn){
        //条件拼接
    
        return queryWrapper;
    }
}
